package org.jeecg.modules.sggg.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * @Description: 签约表
 * @Author: jeecg-boot
 * @Date: 2022-10-17
 * @Version: V1.0
 */
@Data
@TableName("sg_signing_record")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "sg_signing_record对象", description = "签约表")
public class SgSigningRecord implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "主键")
    private String id;
    /**
     * 创建人
     */
    @ApiModelProperty(value = "创建人")
    private String createBy;
    /**
     * 创建日期
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建日期")
    private Date createTime;
    /**
     * 更新人
     */
    @ApiModelProperty(value = "更新人")
    private String updateBy;
    /**
     * 更新日期
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "更新日期")
    private Date updateTime;
    /**
     * 所属部门
     */
    @ApiModelProperty(value = "所属部门")
    @Dict(dictTable = "sys_depart", dicText = "depart_name", dicCode = "org_code")
    private String sysOrgCode;
    /**
     * 居民编号
     */
    @Excel(name = "居民编号", width = 15, dictTable = "sg_member", dicText = "name", dicCode = "id")
    @Dict(dictTable = "sg_member", dicText = "name", dicCode = "id")
    @ApiModelProperty(value = "居民编号")
    private String memberId;
    /**
     * 服务包id
     */
    @Excel(name = "服务包id", width = 15)
    @ApiModelProperty(value = "服务包id")
    @Dict(dictTable = "sg_service_package", dicText = "name", dicCode = "id")
    private String servicePid;
    /**
     * 订购来源
     */
    @Excel(name = "订购来源", width = 15)
    @Dict(dicCode = "signing_source")
    @ApiModelProperty(value = "订购来源")
    private String source;
    /**
     * 開始服務日期
     */
    @Excel(name = "開始服務日期", width = 20, format = "yyyy-MM-dd")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "開始服務日期")
    private Date startTime;

    /**
     * 结束服务日期
     */
    @Excel(name = "结束服务日期", width = 20, format = "yyyy-MM-dd")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "结束服务日期")
    private Date endTime;

    /**
     * 订单状态(0未开始1使用中2已结束)
     */
    @Excel(name = "订单状态(0未开始1使用中2已结束)", width = 15, dicCode = "signing_status")
    @Dict(dicCode = "signing_status")
    @ApiModelProperty(value = "订单状态(0未开始1使用中2已结束)")
    private String status;

    /**
     * 医生id
     */
    @Excel(name = "医生id", width = 15)
    @ApiModelProperty(value = "医生id")
    @Dict(dictTable = "sys_user", dicText = "realname", dicCode = "id")
    private String userId;

    /**
     * 价格
     */
    @Excel(name = "价格", width = 15)
    @ApiModelProperty(value = "价格")
    private Double price;
    /**
     * 备注
     */
    @Excel(name = "备注", width = 15)
    @ApiModelProperty(value = "备注")
    private String remark;

    /**
     * 服务天数
     */
    @Excel(name = "服务天数", width = 15)
    @ApiModelProperty(value = "服务天数")
    private Integer dayNum;

    /**
     * 订单号
     */
    @Excel(name = "订单号", width = 15)
    @ApiModelProperty(value = "订单号")
    private String idOrder;

    /**
     * 服务項id
     */
    @Excel(name = "服务項id", width = 15)
    @ApiModelProperty(value = "服务項id")
    @Dict(dictTable = "sg_service_item", dicText = "name", dicCode = "id")
    private String serviceTid;

    @TableField(exist = false)
    private String phone;

    @TableField(exist = false)
    private List<String> responsibleAgencies;

    @TableField(exist = false)
    private String memberName;

    @TableField(exist = false)
    private String userName;

    @TableField(exist = false)
    private String idCard;

    @TableField(exist = false)
    private String threeTag;

    @TableField(exist = false)
    private String isXj;

    @TableField(exist = false)
    private String sgPackageName;

    @TableField(exist = false)
    private String sgItemName;

    /**
     * 到期剩余天数
     */
    @TableField(exist = false)
    private Integer num;
}
